﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Xml;
using Common.Utilities;
using Common.Utilities.Dispatcher;

namespace Workflows.Components.Reports
{
    /// <summary>
    /// 
    /// </summary>
    [Serializable]
    public class VennDiagramInstruction:InstructionBase
    {
        #region props
        private SetDataProvider _Provider1;
        /// <summary></summary>
        public SetDataProvider Provider1
        {
            get
            {
                return this._Provider1;
            }
            set
            {
                this._Provider1 = value;
            }
        }

        private SetDataProvider _Provider2;
        /// <summary></summary>
        public SetDataProvider Provider2
        {
            get
            {
                return this._Provider2;
            }
            set
            {
                this._Provider2 = value;
            }
        }

        private SetDataProvider _Provider3;
        /// <summary></summary>
        public SetDataProvider Provider3
        {
            get
            {
                return this._Provider3;
            }
            set
            {
                this._Provider3 = value;
            }
        }

        private string _DiagramFilePath;
        /// <summary></summary>
        public string DiagramFilePath
        {
            get
            {
                return this._DiagramFilePath;
            }
            set
            {
                this._DiagramFilePath = value;
            }
        }
        #endregion

        #region ctor
        /// <summary>
        /// 
        /// </summary>
        public VennDiagramInstruction():base(Guid.Empty, Guid.Empty)
        {
            this._Provider1=new SetDataProvider();
            this._Provider2=new SetDataProvider();
            this._Provider3=new SetDataProvider();
            this._DiagramFilePath = string.Empty;
        }

        /// <summary>
        /// 
        /// </summary>
        /// <param name="componentID"></param>
        /// <param name="jobTicketID"></param>
        /// <param name="provider1"></param>
        /// <param name="provider2"></param>
        /// <param name="provider3"></param>
        /// <param name="resultFilePath"></param>
        public VennDiagramInstruction(
            Guid componentID, Guid jobTicketID,
            SetDataProvider provider1, 
            SetDataProvider provider2, 
            SetDataProvider provider3,
            string resultFilePath) 
            : base(componentID, jobTicketID)
        {
            this._Provider1 = provider1;
            this._Provider2 = provider2;
            this._Provider3 = provider3;
            this._DiagramFilePath = resultFilePath;
        }
        #endregion

        #region Overrides of InstructionBase

        /// <summary>
        /// serialize settings to xml
        /// the function below is mainly for storing into database as serialized form instead of string
        /// </summary>
        public override XmlNode Serialize(ref XmlDocument xDoc, ref XmlNode parentNode)
        {
            throw new System.NotImplementedException();
        }

        /// <summary>
        /// instantiated from xml
        /// "&lt;Instructions&gt;&lt;Instruction&gt;&lt;/Instruction&gt;&lt;/Instruction&gt;", must
        /// instantiate from first child of root node
        /// </summary>
        public override InstructionBase Instantiate(XmlNode xNode)
        {
            throw new System.NotImplementedException();
        }

        #endregion
    }
}
